<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
    return $request->user();
});
/**
 * 登录模块
 */
Route::post('getCapt', [\App\Http\Controllers\LoginControlle::class, 'getCapt']);//获取验证码
Route::post('doLogin', [\App\Http\Controllers\LoginControlle::class, 'doLogin']);//用户登录
Route::post('outLogin', [\App\Http\Controllers\LoginControlle::class, 'outLogin']);//用户登录
/**
 * 用户信息
 */
Route::get('userInfo',[\App\Http\Controllers\LoginControlle::class,'userInfo']);
/**
 * 段视频模块
 */
Route::post('newsVideoList', [\App\Http\Controllers\NewsVideoController::class, 'newsVideoList']);//分页查询短视频信息
Route::post('videoInfo', [\App\Http\Controllers\NewsVideoController::class, 'videoInfo']);//查询短视频信息详情
Route::post('dotLike', [\App\Http\Controllers\NewsVideoController::class, 'dotLike']);//为对应id的短视频点赞
Route::post('delLike', [\App\Http\Controllers\NewsVideoController::class, 'delLike']);//为对应id的短视频取消点赞
/**
 * 商品模块
 */
Route::post('shopInfoList', [\App\Http\Controllers\ShopController::class, 'shopInfoList']);//商品信息分页查询
Route::post('slideshow', [\App\Http\Controllers\ShopController::class, 'slideshow']);//商品页热门轮播图信息查询
Route::post('shopTypeInfo', [\App\Http\Controllers\ShopController::class, 'shopTypeInfo']);//商品分类信息查询
Route::get('shopInfo', [\App\Http\Controllers\ShopController::class, 'shopInfo']);//商品详情信息查询
Route::post('collectShop', [\App\Http\Controllers\ShopController::class, 'collectShop']);//收藏店铺
Route::post('offCollect', [\App\Http\Controllers\ShopController::class, 'offCollect']);//取消收藏店铺
Route::post('createIndex', [\App\Http\Controllers\ShopController::class, 'createIndex']);//创建es索引
Route::post('searchInfo', [\App\Http\Controllers\ShopController::class, 'searchInfo']);//搜索es索引
Route::get('hotsType', [\App\Http\Controllers\ShopController::class, 'hotsType']);//热门分类搜索

/**
 * 购物车模块
 */
Route::post('joinCart', [\App\Http\Controllers\ShopController::class, 'joinCart']);//商品添加购物车
Route::get('cartInfo', [\App\Http\Controllers\ShopController::class, 'cartInfo']);//用户购物车信息查询
Route::post('clearCart', [\App\Http\Controllers\ShopController::class, 'clearCart']);//清空购物车
Route::get('orderList', [\App\Http\Controllers\ShopController::class, 'orderList']);//查询订单信息
Route::get('cartCheckTotal', [\App\Http\Controllers\ShopController::class, 'cartCheckTotal']);//购物选中商品的总价

/**
 * 优惠券模块
 */
Route::get('couponList', [\App\Http\Controllers\CouponController::class, 'couponList']);//查询优惠券信息
Route::get('couponInfo', [\App\Http\Controllers\CouponController::class, 'couponInfo']);//查询优惠券信息
Route::post('drawCoupon', [\App\Http\Controllers\CouponController::class, 'drawCoupon']);//领取优惠券
Route::post('myCoupon', [\App\Http\Controllers\CouponController::class, 'myCoupon']);//查询个人卡包

/**
 * 用户收货地址模块
 */
Route::post('deliveryInfoAdd', [\App\Http\Controllers\DeliveryController::class, 'deliveryInfoAdd']);//添加收货地址
Route::post('getAddress', [\App\Http\Controllers\DeliveryController::class, 'getAddress']);//获取定位信息
Route::get('deliveryInfo', [\App\Http\Controllers\DeliveryController::class, 'deliveryInfo']);//获取用户默认地址信息
Route::get('deliveryInfoList', [\App\Http\Controllers\DeliveryController::class, 'deliveryInfoList']);//获取用户地址信息
Route::post('editDelivery', [\App\Http\Controllers\DeliveryController::class, 'editDelivery']);//更改用户收货地址默认状态
Route::get('userDelivery', [\App\Http\Controllers\DeliveryController::class, 'userDelivery']);//查询用户指定地址信息
/**
 * 支付
 */
Route::get('paymentOrder', [\App\Http\Controllers\OrderController::class, 'paymentOrder']);//查询用户指定地址信息
Route::get('returnApi', [App\PayType\ZhiFuBao::class, 'return']);//查询用户指定地址信息

/**
 * 订单
 */

Route::post('orderInfoAdd',[\App\Http\Controllers\OrderController::class,'orderInfoAdd']);//生成订单
Route::get('orderInfoList',[\App\Http\Controllers\OrderController::class,'orderInfoList']);//个人订单查询
Route::get('payLast',[\App\Http\Controllers\OrderController::class,'payLast']);//支付之后回调页面
Route::get('detectionInfoList',[\App\Http\Controllers\OrderController::class,'detectionInfoList']);//体检报告
Route::get('aboutUs',[\App\Http\Controllers\OrderController::class,'aboutUs']);//关于我们
Route::post('remarkOrder',[\App\Http\Controllers\OrderController::class,'remarkOrder']);//订单评论
Route::get('remarkInfo',[\App\Http\Controllers\OrderController::class,'remarkInfo']);//查看对应商品评论信息
/**
 * 分院
 */
Route::get('branchCourt',[\App\Http\Controllers\BranchCourtController::class,'branchCourt']);//查询医院分院列表
Route::get('branchDynamic',[\App\Http\Controllers\BranchCourtController::class,'branchDynamic']);//分院动态接口
Route::get('branchCourtInfo',[\App\Http\Controllers\BranchCourtController::class,'branchCourtInfo']);//医院详情
Route::get('mapBranch',[\App\Http\Controllers\BranchCourtController::class,'mapBranch']);//地图导航

